<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template("content","header", "default"); ?>
<?php include template("content","header_product", "default"); ?>
<script language="javascript" src="<?php echo JS_PATH;?>changimages.js"></script>
<!-- 内容begin-->
<div id="shop">
  <div id="shop01">
    <a href="<?php echo APP_PATH;?>index.php?m=member&c=index&a=register&siteid=<?php echo $siteid;?>" class="inputbutton12 p14 strong" />免费注册</a>
    <a href="<?php echo APP_PATH;?>index.php?m=member&c=index&a=login&forward=<?php echo urlencode($_GET['forward']);?>&siteid=<?php echo $siteid;?>" class="inputbutton12 p14 strong" style="margin-left:8px;" />快速登录</a>
    <div class="news_title p14 strong">资讯和活动</div>
    <div class="news_c">
      <ul>
       
      <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=5bc15ba434edd35a8ae70b9ccb1022b3&action=lists&catid=15&num=6&order=id+desc\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'lists')) {$data = $content_tag->lists(array('catid'=>'15','order'=>'id desc','limit'=>'6',));}?>	
			 <?php $n=1;if(is_array($data)) foreach($data AS $s) { ?>
			<li><a href="<?php echo $s['url'];?>"><?php echo $s['title'];?></a>
			<?php $n++;}unset($n); ?>		
			<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
      </ul>
    </div>
    <img src="<?php echo CSS_PATH;?>images/shangcheng_22.gif" style="float:left;" /> </div>
  <div id="shop02">
    <div class="ad_title p14 strong">最新活动</div>
     <div class="ad_c"><div id=imgADPlayer></div>
     <script language="javascript" src="<?php echo APP_PATH;?>caches/poster_js/18.js"></script>
      <script> 
    
		PImgPlayer.init( "imgADPlayer", 462, 220 );   
	</script></div>

    <div class="ad_b"></div>
  </div>
<!--20110612--> 
  <div id="shop11">
  <a href="<?php echo APP_PATH;?>index.php?m=content&c=user&a=buy_product" class="inputbutton21">我要求购</a><a href="#" class="inputbutton21">我要发布</a>
  </div>
  <div id="shop03" >
    <div class="shop03_title p14 strong">打折公告<a href="#" style="font-size:12px; font-weight:normal; color:#717070; margin-left:112px;">更多<font style="font-size:10px;">>></font></a></div>
    <div class="shop03_c" style="height: 150px;">
      <ul>
	  <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=787fae97c3d051a72463b86071e273d4&action=hits&catid=15&num=6&order=monthviews+DESC&cache=3600\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$tag_cache_name = md5(implode('&',array('catid'=>'15','order'=>'monthviews DESC',)).'787fae97c3d051a72463b86071e273d4');if(!$data = tpl_cache($tag_cache_name,3600)){$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'hits')) {$data = $content_tag->hits(array('catid'=>'15','order'=>'monthviews DESC','limit'=>'6',));}if(!empty($data)){setcache($tag_cache_name, $data, 'tpl_data');}}?>
		<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
			<li><a href="<?php echo $r['url'];?>"<?php echo title_style($r[style]);?> class="title" title="<?php echo $r['title'];?>"><?php echo str_cut($r[title],56,'...');?></a></li>
		<?php $n++;}unset($n); ?>
	<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
       
		
      </ul>
     
    </div>
    <div class="shop03_b"></div>
  </div>
<!--20110612--> 
  <div id="shop04" style="min-height:400px">
     <div class="shop04_title p14 strong">建材分类</div>
    <div class="shop04_c">
	  <div class="shop04_001"></div>
      <div class="shop04_c01">
     <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=768bf54dbfd1b8c44d4e7b3cfd6f81df&action=get_product_cat&catid=%24catid&num=25&order=id+DESC&page=%24page\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'get_product_cat')) {$pagesize = 25;$page = intval($page) ? intval($page) : 1;if($page<=0){$page=1;}$offset = ($page - 1) * $pagesize;$content_total = $content_tag->count(array('catid'=>$catid,'order'=>'id DESC','limit'=>$offset.",".$pagesize,'action'=>'get_product_cat',));$pages = pages($content_total, $page, $pagesize, '');$data = $content_tag->get_product_cat(array('catid'=>$catid,'order'=>'id DESC','limit'=>$offset.",".$pagesize,'action'=>'get_product_cat',));}?>	
				<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
	 	 <div class="shop04_c02">
	  	<div class="shop04_c02_title"><h1 class="p14 strong"><a href="<?php echo APP_PATH;?>index.php?m=content&c=index&a=product_cat&pid=<?php echo $r['linkageid'];?>"><?php echo $r['name'];?></a></h1></div>
		 <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=53a7b8df0d4352ce3809183713b9c0c9&action=get_product_cat&id=%24r%5Blinkageid%5D&return=cats\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'get_product_cat')) {$cats = $content_tag->get_product_cat(array('id'=>$r[linkageid],'limit'=>'20',));}?>	
			 <?php $n=1;if(is_array($cats)) foreach($cats AS $s) { ?>
			<a href="<?php echo APP_PATH;?>index.php?m=content&c=index&a=product_cat&cid=<?php echo $s['linkageid'];?>&pid=<?php echo $s['parentid'];?>"><?php echo $s['name'];?></a>
			<?php $n++;}unset($n); ?>		
			<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
		</div>
		<?php $n++;}unset($n); ?>		
		<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
	  </div>
    </div>
    <div class="shop04_b"></div>
  </div>
  <div id="shop05">
    <div class="shop05_title"><h1 class="p14">产品推荐</h1></div>
    <div class="shop05_c"><ul>
    <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=8bc80a8cc08b7453d8150bf2be940efe&action=position&posid=10&catid=18&thumb=1&order=listorder+DESC&num=10\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'position')) {$data = $content_tag->position(array('posid'=>'10','catid'=>'18','thumb'=>'1','order'=>'listorder DESC','limit'=>'10',));}?>
    	<?php $n=1;if(is_array($data)) foreach($data AS $v) { ?>
		    <li>
		    <a href="<?php echo APP_PATH;?>index.php?m=content&c=index&a=show&catid=18&id=<?php echo $v['id'];?>"><img src="<?php echo thumb($v[thumb],90,60);?>" width="96" height="96" /></a>
			<span><a href="<?php echo $v['url'];?>" target="_blank"<?php echo title_style($v[style]);?>><?php echo $v['title'];?></a></span>
			</li>
		<?php $n++;}unset($n); ?>
	<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
	
	</ul>	
	</div>
    <div class="shop05_b"></div>
  </div>
  <div id="shop05">
    <div class="shop05_title"><h1 class="p14">建材杂谈</h1><tt><a href="./zatan.html">更多>></a></tt></div>
    <div class="shop05_c">
	<dl>
	<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=8b10b46515af06d62dbd56048e016d85&action=hits&catid=14&num=10&order=monthviews+DESC&cache=3600\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$tag_cache_name = md5(implode('&',array('catid'=>'14','order'=>'monthviews DESC',)).'8b10b46515af06d62dbd56048e016d85');if(!$data = tpl_cache($tag_cache_name,3600)){$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'hits')) {$data = $content_tag->hits(array('catid'=>'14','order'=>'monthviews DESC','limit'=>'10',));}if(!empty($data)){setcache($tag_cache_name, $data, 'tpl_data');}}?>
		<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
			<dt><a href="<?php echo $r['url'];?>"<?php echo title_style($r[style]);?> class="title" title="<?php echo $r['title'];?>"><?php echo str_cut($r[title],56,'...');?></a></dt>
		<?php $n++;}unset($n); ?>
	<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
	</dl>
	</div>
    <div class="shop05_b"></div>
  </div>
</div>
<!-- 内容end-->
<!--友情链接begin-->
<div class="m06">
  <div class="m06_title">
  <h1><a href="javascript:void(0);">友情链接</a></h1>
  </div>
  <ul>
   <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"link\" data=\"op=link&tag_md5=99c32cd273c57223c20074bf5196e97a&action=type_list&siteid=%24siteid&order=listorder+DESC&num=10&return=dat\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$link_tag = pc_base::load_app_class("link_tag", "link");if (method_exists($link_tag, 'type_list')) {$dat = $link_tag->type_list(array('siteid'=>$siteid,'order'=>'listorder DESC','limit'=>'10',));}?>
		<?php $n=1;if(is_array($dat)) foreach($dat AS $v) { ?>
              <?php if($type==0) { ?>
            <li>  <a href="<?php echo $v['url'];?>" target="_blank"><?php echo $v['name'];?></a>  </li>
              <?php } else { ?>
             <li> <a href="<?php echo $v['url'];?>" target="_blank"><img src="<?php echo $v['logo'];?>" width="88" height="31" style="border: 1px solid #FFBE7A;"></a> </li>
              <?php } ?>
		<?php $n++;}unset($n); ?>
	<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
  </ul>
</div>
<!-- 友情链接end-->
<!-- 内容end-->
<?php include template("content","footer"); ?>